import { Component } from '@angular/core';
import { IonicPage, NavParams, ViewController } from 'ionic-angular';

import { CustomerService } from '../../providers/providers';

@IonicPage()
@Component({
  selector: 'page-customer-popover',
  templateUrl: 'customer-popover.html',
})
export class CustomerPopoverPage {
	private items: any;


  constructor(public viewCtrl: ViewController, public navParams: NavParams,
    public customerService: CustomerService) {
  }

  ionViewDidLoad() {
    let param = {
      tradId: this.navParams.data.data.tradeTypeId
    }
    this.customerService.queryStatByCustomer(param)
    .subscribe((res) => {
      if(res.success) {
        this.items = res.data;
      }
    });
  }

  clickItem(item) {
  	this.viewCtrl.dismiss(item);
  }

}
